//
//  MBTPre.h
//  mengbutou
//
//  Created by Jiafei Wei on 16/6/30.
//  Copyright © 2016年 Jiafei Wei. All rights reserved.
//

#ifndef MBTPre_h
#define MBTPre_h
//第一次启动
#define kFirstLaunch [NSUserDefaults standardUserDefaults] boolForKey:@"firstLaunch"]
#define kSetFirstLaunch [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"firstLaunch"]
//记住密码
#define kSwithPassword [NSUserDefaults standardUserDefaults] boolForKey:@"rememberPwd"]
#define kSetRememberPassword [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"rememberPwd"]
#define kSetNotRememberPassword [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"rememberPwd"]

//保存用户名密码
#define kRememberAccount [[NSUserDefaults standardUserDefaults]objectForKey:@"account"]
#define kRememberPassword [[NSUserDefaults standardUserDefaults]objectForKey:@"password"]
#define kSetAccount(__ACCOUNT__) [[NSUserDefaults standardUserDefaults] setValue:__ACCOUNT__ forKey:@"account"]
#define kSetPassword(__PASSWORD__) [[NSUserDefaults standardUserDefaults] setValue:__PASSWORD__ forKey:@"password"]

//登录页头像
#define kRememberPhotoPath [NSString stringWithFormat:@"%@%@",kRememberAccount,@"_photo"]
#define kRememberPhotoData [[NSUserDefaults standardUserDefaults] objectForKey:kRememberPhotoPath]
#define kSavePhotoObj(__DATAOBJ__) [[NSUserDefaults standardUserDefaults] setObject:__DATAOBJ__ forKey:kRememberPhotoPath];


#define SCREEN_H   [[UIScreen mainScreen] bounds].size.height
#define SCREEN_W   [[UIScreen mainScreen] bounds].size.width

#define IOSVersion  [[UIDevice currentDevice] systemVersion]
#define IS_IOS7() ([[[UIDevice currentDevice]systemVersion] floatValue] >= 7)
#define IS_IOS8 ([[[UIDevice currentDevice]systemVersion] floatValue] >= 8)

#endif /* MBTPre_h */
